<template>
	<view class="passenger-flow">
		<view class="box_9">
			<view class="listall" style="margin-top: 20rpx;">
				<view class="d-flex flex-column listsee">
					<view class="d-flex flex-row justify-space-between">
						<view class="d-flex flex-row align-center">
							<view class="">
								<image style="width: 100rpx;height: 100rpx;border-radius: 50%;"
									:src="infoList.head_img"  mode=""></image>
							</view>
							<view class="d-flex flex-column" style="margin-left: 20rpx;">
								<view class="d-flex flex-row">
									<view class="" style="font-size: 26rpx;">
										{{infoList.name}}
									</view>
									<view class=""
										style="width: 100rpx;height: 40rpx;background: #e3ffe0;color: #69a66a;font-size: 22rpx;text-align: center;margin-left: 20rpx;line-height: 40rpx;">
										已认证
									</view>
								</view>
								<view class="" style="color: #c2c2c2;font-size: 24rpx;margin-top: 10rpx;">
									<text v-if="infoList.sex == 2">女</text>
									<text v-if="infoList.sex == 1">男</text>
									 | {{infoList.age}}岁 | {{infoList.birthday}}
								</view>
								<view class="" style="color: #c2c2c2;font-size: 24rpx;margin-top: 10rpx;">
									手机号码：{{infoList.mobile}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view scroll-y class="listall">
				<!-- <v-gap /> -->
				<view class="d-flex flex-column listsee" v-for="(item,index) in hylist" :key="index"
					@click="onlist(item,index)">
					<view class="d-flex flex-row justify-space-between">
						<view class="d-flex flex-row align-center">
							<view class="">
								<image style="width: 80rpx;height: 80rpx;" :src="item.cover" mode="">
								</image>
							</view>
							<view class="d-flex flex-column" style="margin-left: 20rpx;">
								<view class="" style="font-size: 26rpx;">
									{{item.name}}
								</view>
								<view class="d-flex flex-row align-center justify-center" style="margin-top: 10rpx;">
									<!-- <view class=""
												style="width: 80rpx;height: 40rpx;background: #edffeb;color: #7cc57e;font-size: 24rpx;text-align: center;margin-right: 20rpx;line-height: 40rpx;">
												新报
											</view> -->
									<view class="" style="font-size: 24rpx;">
										剩余{{item.left_num}}次
									</view>
								</view>
							</view>
						</view>
						<view class="d-flex flex-column align-center">
							<view class=""
								style="width: 80rpx;height: 40rpx;background: #edffeb;color: #7cc57e;font-size: 24rpx;text-align: center;line-height: 40rpx;">
								{{item.status_show}}
							</view>
							<!-- <view class="" style="font-size: 24rpx;margin-top: 10rpx;">
										游泳短训计次
									</view> -->
						</view>
					</view>
					<!-- <view class="d-flex flex-row align-center"
								style="font-size: 24rpx;color: #9e9e9e;line-height: 50rpx;">
								<image class="" style="width: 20rpx;height: 20rpx;"
									src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a70accdc329c0011116ca9/16731594764081021110.png" />
								<view class="" style="margin-left: 10rpx;font-size: 24rpx; color: #b8b8b8;">
									2023-12-01 至 2024-06-30
								</view>
							</view> -->
					<view class="d-flex flex-row align-center"
						style="font-size: 24rpx;color: #9e9e9e;line-height: 50rpx;">
						<image class="" style="width: 20rpx;height: 20rpx;"
							src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a70accdc329c0011116ca9/16731594764081021110.png" />
						<view class="" style="margin-left: 10rpx;font-size: 24rpx; color: #b8b8b8;">
							课包规格：{{item.train_name?item.train_name:''}}
						</view>
					</view>
					<view class="d-flex flex-row justify-start align-center"
						style="font-size: 24rpx;color: #9e9e9e;line-height: 50rpx;">
						<view class="d-flex flex-row align-center"
							style="font-size: 24rpx;color: #9e9e9e;line-height: 50rpx;">
							<image class="" style="width: 20rpx;height: 20rpx;"
								src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a70accdc329c0011116ca9/16731594764081021110.png" />
							<view class="" style="margin-left: 10rpx;font-size: 24rpx; color: #b8b8b8;">
								校区：{{item.area_name?item.area_name:''}}
							</view>
						</view>
						<view class="d-flex flex-row align-center"
							style="font-size: 24rpx;color: #9e9e9e;line-height: 50rpx;margin-left: 20rpx;">
							<image class="" style="width: 20rpx;height: 20rpx;"
								src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a70accdc329c0011116ca9/16731594764081021110.png" />
							<view class="" style="margin-left: 10rpx;font-size: 24rpx; color: #b8b8b8;">
								教练：{{item.coach_name?item.coach_name:''}}
							</view>
						</view>
					</view>
					<!-- <view class="d-flex flex-row justify-end"
								style="font-size: 24rpx;color: #9e9e9e;line-height: 50rpx;margin-top: 10rpx;">
								<view class=""
									style="width: 120rpx;height: 50rpx;background: #ffffff;color: #6d6d6d;font-size: 24rpx;text-align: center;line-height: 50rpx;margin-right: 20rpx;border: 1rpx #ababab solid;">
									课程反馈
								</view>
								<view class=""
									style="width: 120rpx;height: 50rpx;background: #5abdff;color: #ffffff;font-size: 24rpx;text-align: center;line-height: 50rpx;">
									查看课表
								</view>
							</view> -->
				</view>
			</view>
			<!-- <v-gap height="140rpx" color="#EDF5F5" /> -->

		</view>
	</view>
</template>
<script>
	const venues = require("@/api/venues/venues.js");
	const personal = require("@/api/personal/index.js");
	export default {
		data() {
			return {
				filterData: [],
				itemChooselist: {},
				venuelist: [],
				plshow: true,
				weekSelect: [], //选中的
				hylist: [],
				isAllSelect: false, //是否全选
				recordList: [],
				listQuery: { //分页
					pageNo: 1,
					pageSize: 7,
				},
				totalPage: '', //几页
				student_id: '',
				infoList:{}
			}
		},
		onLoad(options) {
			this.student_id = options.student_id
			this.pk_list()
		},
		methods: {
			async pk_list() {
				let that = this;
				if (this.listQuery.pageNo === 1) that.hylist = [];
				let params = {
					venue_id: this.itemChooselist.id,
					keyword: this.keyword,
					pageSize: this.listQuery.pageSize,
					page: this.listQuery.pageNo,
					student_id: this.student_id
				}
				let res = await venues.pk_list(params)
				if (res.code === 1) {
					that.hylist = that.hylist.concat(res.data.list.data); //将数据拼接在一起
					that.totalPage = res.data.list.last_page
					that.infoList = res.data.stuInfo
				}
			},
			// 下拉刷新
			onReachBottom() {
				if (this.totalPage <= this.listQuery.pageNo) {
					uni.showToast({
						title: '没有更多了',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				this.listQuery.pageNo += 1
				this.pk_list()
			},
			onlist(item, index) {
				uni.navigateTo({
					url: '../coursepackagelistdetail/index?id=' + item.id
				})
			},
			// 金额计算保留两位小数
			amount(value) {
				return parseFloat(value).toFixed(2);
			},
			handSelect(item) {

			},

		}
	}
</script>

<style lang="scss" scoped>
	.passenger-flow {
		width: 100%;
		min-height: 100vh;
		display: flex;
		flex-direction: column;
		background-color: #EDF5F5;
		padding: 0rpx 0 50rpx 0;
		position: relative;

		.box_9 {
			width: 750rpx;
			height: 100%;
			// margin-bottom: 1rpx;
			display: flex;
			flex-direction: column;
			padding: 0 20rpx;
			position: relative;

			.tag-list {
				display: flex;
				margin-top: 30rpx;
				padding: 0 20rpx;

				/deep/ view {
					margin-left: 4rpx;
				}
			}

			.box_11 {
				width: 100%;
				height: 130rpx;
				display: flex;
				flex-direction: row;
				background: #ffffff;
				padding: 0 20rpx;

				// .image-wrapper_7 {
				// 	width: 541rpx;
				// 	height: 60rpx;
				// 	flex-direction: row;
				// 	display: flex;
				// 	margin-top: 15rpx;
				// }
				.image-wrapper_7 {
					position: absolute;
					left: 30rpx;
					top: 30rpx;
					width: 541rpx;
					height: 62rpx;
					flex-direction: row;
					display: flex;
				}

				.label_list {
					display: flex;
					flex-direction: column;
					position: absolute;
					justify-content: center;
					/* 相对父元素水平居中 */
					align-items: center;
					/*  子元素相对父元素垂直居中 */
					right: 90rpx;
					width: 80rpx;
					top: 27rpx;

					.label_7 {
						width: 36rpx;
						height: 36rpx;
					}

					.label_77 {
						width: 60rpx;
						height: 36rpx;
						color: #333333;
						font-size: 26rpx;
						text-align: center;
					}
				}

				.label8_list {
					display: flex;
					flex-direction: column;
					position: absolute;
					justify-content: center;
					/* 相对父元素水平居中 */
					align-items: center;
					/*  子元素相对父元素垂直居中 */
					right: 20rpx;
					width: 80rpx;
					top: 27rpx;

					.label_8 {
						width: 36rpx;
						height: 36rpx;
					}

					.label_88 {
						width: 60rpx;
						height: 36rpx;
						color: #333333;
						font-size: 26rpx;
						text-align: center;
					}
				}
			}

			/deep/.u-row {
				// margin-top: 40rpx;

				.box {
					border-radius: 12rpx;
					background-color: #ffffff;
					padding: 40rpx 0;

					.number {
						color: #2f75fa;
						margin-bottom: 40rpx;
						font-weight: bold;
					}
				}
			}

			.all_whole {
				width: 100%;
				display: flex;
				flex-direction: column;
				// background: #ffffff;

				.all_whole_be {
					display: flex;
					flex-direction: row;
					justify-content: space-around;
					padding: 0 10rpx;
					margin-top: 20rpx;

					.all_whole_or {
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						width: 40%;
						height: 200rpx;
						// border-radius: 20rpx;
					}

					/* 使用类名来设置背景色 */
					.bg-color-all {
						background: #ffffff;
					}

					.bg-color-reading {
						background: #ffffff;
					}

					.bg-color-graduated {
						background: #ffffff;
					}

					.bg-color-potential {
						background: #ffffff;
					}

					.wz-color-all1 {
						font-size: 24rpx;
					}

					.wz-color-all2 {
						color: #000000;
						font-weight: 600;
						font-size: 28rpx;
					}

					.wz-color-reading2 {
						color: #000000;
						font-weight: 600;
						font-size: 28rpx;
					}

					.wz-color-graduated2 {
						color: #000000;
						font-weight: 600;
						font-size: 28rpx;
					}

					.wz-color-potential2 {
						color: #000000;
						font-weight: 600;
						font-size: 28rpx;
					}
				}

				.all_potent {
					display: flex;
					flex-direction: row;
					justify-content: space-around;
					color: #c2c2c2;
					font-size: 22rpx;
					height: 80rpx;
					width: 100%;
					justify-content: space-between;
					align-items: center;
					padding: 0 20rpx;

					.all_shuju1 {}

					.all_shuju2 {
						display: flex;
						flex-direction: row;
						justify-content: center;
						align-items: center;

						.all_shuju2_img {
							width: 20rpx;
							height: 20rpx;
							margin-right: 10rpx;
						}
					}
				}

				.alls_potent {
					display: flex;
					flex-direction: row;
					justify-content: space-around;
					height: 80rpx;
					width: 100%;
					justify-content: space-between;
					align-items: center;
					padding: 0 20rpx;

					.alls_shuju1 {
						font-size: 28rpx;
					}

					.alls_shuju2 {
						display: flex;
						flex-direction: row;
						justify-content: center;
						align-items: center;

						.alls_shuju2_img {
							width: 20rpx;
							height: 20rpx;
						}
					}
				}
			}

			.listall {
				.listsee {
					background-color: #fff;
					padding: 30rpx;
					border-radius: 10rpx;
					// width: 98%;
					// margin-left: 2%;
					border-bottom: 1rpx #ebebeb solid;
					margin-bottom: 20rpx;
				}

				.active1 {
					border: 2rpx #0000ff solid;
				}
			}

			/deep/.u-cell-group {
				.name {
					color: #333;
					font-weight: bold;
				}

				.number {
					color: #ff4105;
				}

				.date {
					color: #ccc;
				}

				.rest {
					color: #9c9c9c;
				}

				.rest,
				.date {
					margin-top: 14rpx;
					font-size: 26rpx;
				}
			}

			.onlist {
				padding: 0 20rpx 0 20rpx;

				.item {
					padding: 20rpx 0;

					.info-container {
						display: flex;
						// flex-grow: 1;
						align-items: center;
						justify-content: space-between;
						padding-right: 20rpx;
						/* 根据需要调整右边距 */
					}

					.name {
						width: 130rpx;
					}

					.input-wrapper {
						min-width: 100rpx;
						/* 根据需要设置最小宽度 */
					}

					.aligned-input {
						font-size: 22rpx;
						border: 1rpx #e8e8e8 solid;
						padding-left: 10rpx;
						width: 200rpx;
						/* 使输入框填充整个容器 */
						box-sizing: border-box;
						/* 确保内边距和边框计入元素总宽度 */
					}

					.tag {
						margin-left: 10rpx;
					}

					.phone {
						color: #BEBEBE;
						font-size: 26rpx;
						margin-top: 13rpx;
					}
				}
			}

		}
	}
</style>